<template>
  <div>
    <!-- 社区任务列表 -->
    <canuse-tab
      v-model="active"
      :list="list"
      sticky
      border
      class="canuse-tabs__wrap canuse-tabs__navs mt-20"
    >
      <!-- 列表 -->
      <div @click="toDetail(item)" class="pt-20 pb-20 text-center border-bottom" v-for="(item, index) in datas" :key="index">{{index + 1}}、{{item.name}}</div>

    </canuse-tab>
  </div>
</template>

<script>
export default {
  data () {
    return {
      list: ["社区投票活动列表"],
      active: 0,
      datas: [{name: '写对联任务'}, {name: '出演T台'}, {name: '寻人启事'}]
    }
  },

  methods: {
    toDetail (item) {
      uni.navigateTo({
        url: `/pages/page/voteDetail`
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.canuse-tabs__wrap {
  /deep/ .canuse-tab.active[data-v-16c34e12]::after {
    background-color: #479995;
  }

  /deep/ .sticky {
    top: 0;
  }
}
</style>